<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>{% block title %}{{folder}} - Browse Files{% endblock %}</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

  <link rel="stylesheet" type="text/css" href="{{ asset('bundles/filesmanager/css/style.css') }}" media="all" />
  <link rel="stylesheet" href="{{ asset('bundles/filesmanager/css/css/jquery-ui.css') }}" type="text/css" media="all" />
  <link rel="stylesheet" href="{{ asset('bundles/filesmanager/css/css/jquery.ui.scrollbar.css') }}" type="text/css" media="all" />
  <link rel="stylesheet" href="{{ asset('bundles/filesmanager/css/css/themes/greyshade.css') }}" type="text/css" media="all" />

  

	<script type="text/javascript" src="{{ asset('bundles/filesmanager/js/jquery.js') }}"></script>
    <script type="text/javascript" src="{{ asset('bundles/filesmanager/js/rightClickMenu.js') }}"></script>

    <script type="text/javascript" src="{{ asset('bundles/filesmanager/js/selectedFiles.js') }}"></script>
	
	<script type="text/javascript" src="{{ asset('bundles/filesmanager/js/js/jquery.min.js') }} "></script>
	<script type="text/javascript" src="{{ asset('bundles/filesmanager/js/js/jquery.mousewheel.js') }}"></script>
	<script type="text/javascript" src="{{ asset('bundles/filesmanager/js/js/jquery-ui.min.js') }}"></script>
	<script type="text/javascript" src="{{ asset('bundles/filesmanager/js/js/jquery.ui.scrollbar.min.js') }}"></script>
	<script type="text/javascript">
				$(document).ready(function()
				{
				  $(".browser").scrollbar({orientation: 'vertical'});
				  $(".list").scrollbar({orientation: 'vertical'});
				});
				
	</script>
{% block head %}
{% endblock %}
</head>
<body>

<div class="disable"></div>
<img class="loading" id="loading" src="{{ asset('bundles/filesmanager/images/ajax-loader.gif') }}">

<div class="upload">
	<output id="list"></output>
	<div class="chooseFile"><label for="choosefile">Choose File:</label><input name="files"  id="files" type="file"></div>
	<div class="progressBar"><div id="step">0%</div></div>
	<div class="button"><input class="btn" onclick="cancelUpload()" type="button" value="Cancel"><input class="btn" type="button" onclick="startUpload()" value="Upload"></div>
</div>
	<script type="text/javascript">
				document.getElementById('files').addEventListener('change', handleFileSelect, false);
	</script>


<div  class="confirm" id="confirm">
<div id="confirm_t" class="t">Title</div>
<div id="confirm_m" class="m">Message</div>
<div id="confirm_b" class="b"><input class="btn" type="button" onclick="confirmOK()" Value="Yes"><input class="btn" onclick="confirmNO()" type="button" Value="No"></div>
</div>

<div id="rightMenu" class="rightMenu">
<div class="element"><img src="{{ asset('_Private/ControlIcons/newFolder.png') }}" width="20" />New Folder</div>
<div class="element"><img src="{{ asset('_Private/ControlIcons/refrash.png') }}" width="20" />Refrash</div>
<div class="element"><img src="{{ asset('_Private/ControlIcons/upload.png') }}" width="20" />Uploads</div>
<div class="element"><img style="margin-left:5px;" src="{{ asset('_Private/ControlIcons/up.png') }}" width="15" />Up One Folder</div>
</div>

<div id="filePermission" class="permission">
<label>File Permission</label>
<table>
  <tr>
    <th width="50">Read</th>
    <th width="50">Write</th>
    <th width="50">Execute</th>
  </tr>
  <tr>
    <th colspan="3">Owner</th>
  </tr>
  <tr>
    <td><input type="checkbox" name="OR" /></td>
    <td><input type="checkbox" name="OW" /></td>
    <td><input type="checkbox" name="OE" /></td>
  </tr>
  <tr>
   <th colspan="3">Group</th>
  </tr>
  <tr>
    <td><input type="checkbox" name="GR" /></td>
    <td><input type="checkbox" name="GW" /></td>
    <td><input type="checkbox" name="GE" /></td>
  </tr>
  <tr>
    <th colspan="3">Other</th>
  </tr>
  <tr>
    <td><input type="checkbox" name="TR" /></td>
    <td><input type="checkbox" name="TW" /></td>
    <td><input type="checkbox" name="TE" /></td>
  </tr>
</table>

    <input class="button" type="button" name="" value="OK" />
</div>

    <div class="header">
           {% block header %}{% endblock %} 
    </div>
    <div class="title">
		 <div class="file">
			<input id="cAll" type="checkbox" name="filename" value="filename" onchange="checkboxSelectedAll({{countFiles}})" />
			<label class="vline"></label>
			<img src="{{ asset('_Private/FileIcons/folder.png') }}"  />
			<label class="vline"></label>
			<input class="saerch"  type="text" size="23" value=" Saerch ...">
			 <label class="vline"></label>
			 <label class="vline"></label>
			 <img src="{{ asset('_Private/ControlIcons/up.png') }}" onclick="backToUp('{{ path('_file_manage_back') }}')" width=15 height=15 />
			 <label class="vline"></label>
			<img src="{{ asset('_Private/ControlIcons/DeleteFile.png') }}" width=15 height=15  />
			<label class="vline"></label>
			<img src="{{ asset('_Private/ControlIcons/EditFile.png') }}" width=20 height=20  />
			<label class="vline"></label>
			 
		 </div>
     </div>
	 
    <div class="left">
	     <div class="tree">Folders  <img onclick="showUpload()" src="{{ asset('_Private/ControlIcons/upload.png') }}" width=25 height=25/><img onclick="createFolder()" src="{{ asset('_Private/ControlIcons/newFolder.png') }}" width="25" /> <img onclick="refresh('{{ path('_file_manage_refresh') }}')" src="{{ asset('_Private/ControlIcons/refrash.png') }}" width="25" /> </div>
			<div class="list">
				{% for fo in mianfolders %}
					<div class="file">  <img src="{{ asset('_Private/FileIcons/folder.png') }}" onclick="folderBrowse('{{ path('_file_manage_browse',{'folder': fo})}}')" width="25" />{{fo}}</div>
				{% endfor %}
				<div id="newFolder" class="file newfolder">  <img src="{{ asset('_Private/FileIcons/folder.png') }}"  width="25" /><input id="createFolder" onblur="saveCreateFolder()" type="text" size="12"></div>
			</div>
	</div>
     <div class="browser">
		{% for fo in folders %}
				<div id="file{{fo.index}}" onmouseover="file_mouseover({{fo.index}})" onmouseout="file_mouseout({{fo.index}})" onclick="fileClicked({{fo.index}})" class="file">
				<input id="cfile{{fo.index}}" type="checkbox" name="filename" value="filename" onchange="checkboxSelected({{fo.index}})" />
				<input id="hfile{{fo.index}}" type="hidden" value="0" />
				<label class="vline"></label>
				<img src="{{ asset('_Private/FileIcons/folder.png') }}"  />
				<label class="vline"></label>
				<input onmouseover="file_mouseover({{fo.index}})" onmouseout="file_mouseout({{fo.index}})" onclick="fileClicked({{fo.index}})" readonly="readonly" class="rename" id="tfile{{fo.index}}" type="text" size="25" value="{{fo.name}}" onblur="saveChange({{fo.index}},'{{ path('_file_manage_renameFolder',{'folder':fo.name}) }}')">
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/RenameFile.png') }}" width=20 height=20 onclick="renameFile({{fo.index}})" />
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/DeleteFile.png') }}" width=15 height=15 onclick="fileDeleted({{fo.index}},'{{ path('_file_manage_deletefolder',{'folder':fo.name}) }}')" />
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/EditFile.png') }}" width=20 height=20 onclick="changedPermission(event,{{fo.index}})" />
				<label class="vline"></label>
				<label class="vline"></label>
				{{fo.modifyDate}} , 
				{{fo.size}} , 
				{{fo.filescount}} Files , 
				{{fo.folderscount}} Folders
				<label class="vline"></label>
				</div> 
		{% endfor %}
		{% for fi in files %}
				<div id="file{{fi.index}}" onmouseover="file_mouseover({{fi.index}})" onmouseout="file_mouseout({{fi.index}})" onclick="fileClicked({{fi.index}})" class="file">
				<input id="cfile{{fi.index}}" type="checkbox" name="filename" value="filename" onchange="checkboxSelected({{fi.index}})" />
				<input id="hfile{{fi.index}}" type="hidden" value="0" />
				<label class="vline"></label>
				<img class="doc" src="{{ asset('_Private/ControlIcons/img_trans.gif') }}"  />
				<label class="vline"></label>
				<input onmouseover="file_mouseover({{fi.index}})" onmouseout="file_mouseout({{fi.index}})" onclick="fileClicked({{fi.index}})" readonly="readonly" class="rename" id="tfile{{fi.index}}" type="text" size="25" value="{{fi.name}}" onblur="saveChange({{fi.index}},'{{ path('_file_manage_renameFile',{'file': fi.name}) }}')">
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/RenameFile.png') }}" width=20 height=20 onclick="renameFile({{fi.index}})" />
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/DeleteFile.png') }}" width=15 height=15 onclick="fileDeleted({{fi.index}},'{{ path('_file_manage_deletefile',{'file':fi.name}) }}')" />
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/EditFile.png') }}" width=20 height=20 onclick="changedPermission(event,{{fi.index}})" />
				<label class="vline"></label>
				<img src="{{ asset('_Private/ControlIcons/download.png') }}" width=15 height=15 onclick="fileDownload('{{ path('_file_manage_download',{'file' : fi.name }) }}')" />
				<label class="vline"></label>
				{{fi.modifyDate}} , 
				{{fi.size}}  , 
				{{fi.downloads}} Downloads
				<label class="vline"></label>
				</div>
		{% endfor %}		
     </div>

     <div class="footer">
     Copyright {{copyDate}} &copy; {{copyName}} , Development by Abd Bataineh

    </div>


</body>

</html>
